package cn.wolfcode.service.impl;

import cn.wolfcode.domain.RolePermission;
import cn.wolfcode.mapper.RolePermissionMapper;
import cn.wolfcode.service.IRolePermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RolePermissionServiceImpl implements IRolePermissionService {

    @Autowired
    private RolePermissionMapper mapper;

    @Override
    public int insert(RolePermission record) {
        return mapper.insert(record);
    }

    @Override
    public List<RolePermission> selectAll() {
        return mapper.selectAll();
    }

    @Override
    public void deleteByRoleId(Long id) {
        mapper.deleteByRoleId(id);
    }

    @Override
    public void deleteByPermissionId(Long id) {
        mapper.deleteByPermissionId(id);
    }
}
